Optimal. Leaf size=84 \[ \frac {\cos ^3(e+f x)}{3 f (a-b)}-\frac {a \cos (e+f x)}{f (a-b)^2}-\frac {a \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{f (a-b)^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3664, 453, 325, 205} \[ \frac {\cos ^3(e+f x)}{3 f (a-b)}-\frac {a \cos (e+f x)}{f (a-b)^2}-\frac {a \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{f (a-b)^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 325
Rule 453
Rule 3664
Rubi steps
\begin {align*} \int \frac {\sin ^3(e+f x)}{a+b \tan ^2(e+f x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {-1+x^2}{x^4 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac {\cos ^3(e+f x)}{3 (a-b) f}+\frac {a \operatorname {Subst}\left (\int \frac {1}{x^2 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{(a-b) f}\\ &=-\frac {a \cos (e+f x)}{(a-b)^2 f}+\frac {\cos ^3(e+f x)}{3 (a-b) f}-\frac {(a b) \operatorname {Subst}\left (\int \frac {1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{(a-b)^2 f}\\ &=-\frac {a \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{(a-b)^{5/2} f}-\frac {a \cos (e+f x)}{(a-b)^2 f}+\frac {\cos ^3(e+f x)}{3 (a-b) f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.66, size = 149, normalized size = 1.77 \[ \frac {(a-b) \cos (e+f x) ((a-b) \cos (2 (e+f x))-5 a-b)+6 a \sqrt {b} \sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b}-\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )+6 a \sqrt {b} \sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b}+\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{6 f (a-b)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 206, normalized size = 2.45 \[ \left [\frac {2 \, {\left (a - b\right )} \cos \left (f x + e\right )^{3} + 3 \, a \sqrt {-\frac {b}{a - b}} \log \left (\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (a - b\right )} \sqrt {-\frac {b}{a - b}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right ) - 6 \, a \cos \left (f x + e\right )}{6 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} f}, \frac {{\left (a - b\right )} \cos \left (f x + e\right )^{3} - 3 \, a \sqrt {\frac {b}{a - b}} \arctan \left (-\frac {{\left (a - b\right )} \sqrt {\frac {b}{a - b}} \cos \left (f x + e\right )}{b}\right ) - 3 \, a \cos \left (f x + e\right )}{3 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} f}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 1.38, size = 180, normalized size = 2.14 \[ \frac {a b \arctan \left (\frac {a \cos \left (f x + e\right ) - b \cos \left (f x + e\right )}{\sqrt {a b - b^{2}}}\right )}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \sqrt {a b - b^{2}} f} + \frac {a^{2} f^{5} \cos \left (f x + e\right )^{3} - 2 \, a b f^{5} \cos \left (f x + e\right )^{3} + b^{2} f^{5} \cos \left (f x + e\right )^{3} - 3 \, a^{2} f^{5} \cos \left (f x + e\right ) + 3 \, a b f^{5} \cos \left (f x + e\right )}{3 \, {\left (a^{3} f^{6} - 3 \, a^{2} b f^{6} + 3 \, a b^{2} f^{6} - b^{3} f^{6}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.57, size = 107, normalized size = 1.27 \[ \frac {a \left (\cos ^{3}\left (f x +e \right )\right )}{3 f \left (a -b \right )^{2}}-\frac {b \left (\cos ^{3}\left (f x +e \right )\right )}{3 f \left (a -b \right )^{2}}-\frac {a \cos \left (f x +e \right )}{\left (a -b \right )^{2} f}+\frac {a b \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {\left (a -b \right ) b}}\right )}{f \left (a -b \right )^{2} \sqrt {\left (a -b \right ) b}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 13.37, size = 382, normalized size = 4.55 \[ -\frac {\frac {2\,\left (2\,a+b\right )}{3\,{\left (a-b\right )}^2}+\frac {4\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{{\left (a-b\right )}^2}+\frac {2\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4}{{\left (a-b\right )}^2}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}-\frac {a\,\sqrt {b}\,\mathrm {atan}\left (\frac {\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {\sqrt {b}\,\left (8\,a^7\,b-32\,a^6\,b^2+48\,a^5\,b^3-32\,a^4\,b^4+8\,a^3\,b^5\right )}{{\left (a-b\right )}^{9/2}}-\frac {a\,\sqrt {b}\,\left (a-2\,b\right )\,\left (-16\,a^9+128\,a^8\,b-432\,a^7\,b^2+800\,a^6\,b^3-880\,a^5\,b^4+576\,a^4\,b^5-208\,a^3\,b^6+32\,a^2\,b^7\right )}{8\,{\left (a-b\right )}^{15/2}}\right )-\frac {a\,\sqrt {b}\,\left (a-2\,b\right )\,\left (16\,a^9-96\,a^8\,b+240\,a^7\,b^2-320\,a^6\,b^3+240\,a^5\,b^4-96\,a^4\,b^5+16\,a^3\,b^6\right )}{8\,{\left (a-b\right )}^{15/2}}\right )\,{\left (a-b\right )}^5}{4\,a^8\,b-16\,a^7\,b^2+24\,a^6\,b^3-16\,a^5\,b^4+4\,a^4\,b^5}\right )}{f\,{\left (a-b\right )}^{5/2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________